package org.siberia.client.model;

import java.util.Date;

import org.siberia.client.bean.ActionDTO;
import org.siberia.client.bean.ActionSuiteDTO;

import com.extjs.gxt.ui.client.data.BaseModel;

public class ActionModel extends BaseModel
{
	ActionDTO dto = null;
	
	public ActionModel(ActionDTO _dto)
	{
		this.dto = _dto;
		this.set("id", this.dto.id);
		this.set("title", this.dto.title);
		this.set("startDate", this.dto.startDate);
		this.set("endDate", this.dto.endDate);
		this.set("allDayLong", this.dto.allDayLong);
		this.set("remark", this.dto.remark);
		this.set("dayOffset", this.dto.dayOffset);
		this.set("jPlusCount", "J + " + this.dto.dayOffset);
	}
	
	public String getTitle()
	{
		return (String)this.get("title");
	}
	
	public Date getStartDate()
	{
		return (Date)this.get("startDate");
	}
	
	public Date getEndDate()
	{
		return (Date)this.get("endDate");
	}
	
	public Boolean getAllDayLong()
	{
		return (Boolean)this.get("allDayLong");
	}
	
	public String getRemark()
	{
		return (String)this.get("remark");
	}
	
	public Integer getDayOffset()
	{
		return (Integer)this.get("dayOffset");
	}
}
